<include file="application/walletyhbbadmin/view/public/left.html"/>
<script src="__PUBLIC__/js/ueditor/ueditor.config.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/ueditor/ueditor.all.min.js" type="text/javascript"></script>
<style>
    .add_icon {
        width: 120px;
        height: 30px;
        margin-right: 5px;
    }
    .add_icon input,.add_icon_input {
        width: 80px;
        height: 20px;
    }
    .delete_icon {
        width: 30px;
        height: 100%;
        line-height: 25px;
        display: inline-block;
        position: absolute;
        right: 0;
        text-align: center;
        border: 1px solid #dbdbdb;
        box-sizing: border-box;
        font-size: 15px;
        border-left: 0;
    }
</style>
<div id="dcMain">
    <!-- 当前位置 -->
    <div id="urHere">管理中心<b>></b><strong>商品详情</strong> </div>
    <div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
        <h3>商品详情</h3>
            <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
                <tr>
                    <td align="right">商品图片：</td>
                    <td>
                        <img src="{$info.original_img}" width="50px" height="30px">
                    </td>
                    <td width="6%" align="right">商品名称</td>
                    <td>
                        <input type="text" name="name" id="name" required value="{$info.goods_name}" size="50" class="inpMain" disabled />
                    </td>
                </tr>
                <tr>
                    <td width="6%" align="right">商品编号</td>
                    <td>
                        <input type="text" name="name" id="name" required value="{$info.goods_sn}" size="50" class="inpMain" disabled />
                    </td>
                    <td width="6%" align="right">商品关键词</td>
                    <td>
                        <input type="text" name="name" id="name" required value="{$info.keywords}" size="50" class="inpMain" disabled />
                    </td>
                </tr>
                <tr>
                    <td align="right">是否为实物：</td>
                    <td>
                        <input type="radio" name="is_real" value="1"  <if condition= "$info.is_real eq 1">checked="checked"</if>/ disabled>是
                        <input type="radio" name="is_real" value="2"  <if condition= "$info.is_real eq 2">checked="checked"</if>/ disabled>否
                    </td>
                    <td align="right">是否上架：</td>
                    <td>
                        <input type="radio" name="is_on_sale" value="1"  <if condition= "$info.is_on_sale eq 1">checked="checked"</if>/ disabled>是
                        <input type="radio" name="is_on_sale" value="2"  <if condition= "$info.is_on_sale eq 2">checked="checked"</if>/ disabled>否
                    </td>
                    </tr>
                <tr>
                <tr>
                    <td align="right">是否包邮：</td>
                    <td>
                         <input type="radio" name="is_free_shipping" value="1"  <if condition= "$info.is_free_shipping eq 1">checked="checked"</if>/ disabled>是
                         <input type="radio" name="is_free_shipping" value="0"  <if condition= "$info.is_free_shipping eq 0">checked="checked"</if>/ disabled>否
                    </td>
                <td width="90" align="right">多图片：</td>
                <td>
                    <div class="gift-drag-files" id="addfile">
                        <foreach name="images" item="images">
                                <img src="{$images.image_url}" width="90px" height="50px"/>
                        </foreach>
                    </div>
                </td>
                </tr>
                <tr>
                    <td align="right" style="width: 5%;">商品详情：</td>
                    <td width="45%" colspan="3" required>
                        <script id="editors" type="text/plain" style="width:100%;height:300px;right: 0;" name="goods_content" type="text/plain" >
                            {$info.goods_content}
                        </script>
                    </td>
                </tr>
            </table>
        <br>
        <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button"></td>
    </div>
</div>
<div class="clear"></div>
<script type="application/javascript">
    var ue1 = UE.getEditor('editors');
    console.log($("#view"))
    var FieldCount = 1;
    $(document).ready(function() {

        var MaxInputs = 5; //maximum input boxes allowed
        var InputsWrapper = $("#InputsWrapper"); //Input boxes wrapper ID
        var AddButton = $("#AddMoreFileBox"); //Add button ID

        var x = InputsWrapper.length; //initlal text box count
        $(AddButton).click(function (e)  //on add input button click
        {
            if (FieldCount < MaxInputs) //max input box allowed
            {
                 //text box added increment
                //add input box  Text '+ FieldCount +'
                var strAdd = '<div class="add_icon" style="display: inline-block; position: relative;">'+
                                '<input class="inpMain" type="text" name="key_word[]" id="field_' + FieldCount + '" value=""/>'+
    '<a href="#" class="removeclass del_style delete_icon" onClick="deleteFn(event)">×</a>'+
'</div>';
                $(AddButton).before(strAdd);

                FieldCount++; //text box increment
            }
            return false;
        });

    });
    function deleteFn(e, sum){
        console.log(FieldCount)
        console.log($(e.target).parent('.add_icon'));
        $(e.target).parent('.add_icon').remove();
    FieldCount--;
    }

</script>
<include file="application/walletyhbbadmin/view/public/foot.html"/><!-- dcFooter 结束 -->
<!-- dcFooter 结束 -->
<div class="clear"></div>
</div>
</body>

</html>